package com.zhuoshi.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zhuoshi.bean.WdOpeningReport;
import com.zhuoshi.bean.WdPayType;
import com.zhuoshi.serviceImpl.ShenheServiceImpl;
@Controller
public class ShenheController {
	@Autowired 
	private ShenheServiceImpl shenheServiceImpl;
	@RequestMapping("/getAllShenhe")
	public String Test(Model model,HttpServletRequest request)
	{
		
		List<WdOpeningReport> wdopeningreport = 
		shenheServiceImpl .findAllShenhe(); 
		model.addAttribute("wdopeningreport",wdopeningreport );
		request.setAttribute("wdopeningreport",wdopeningreport );
		
		return "/Shenhe";  
	}
	 
    public String Text4(String openingReportId){  
		shenheServiceImpl.updateShenheh(openingReportId);
		
    	 
           return "redirect:/Shenhe";  
           }
	
	
	
	@RequestMapping("/Shenhe")
	public void Test1(Model model,HttpServletRequest request)
	{
		
		List<WdOpeningReport> wdopeningreport = 
		shenheServiceImpl .findAllShenhe(); 
		model.addAttribute("wdopeningreport",wdopeningreport );
		request.setAttribute("wdopeningreport",wdopeningreport );
		
		 
	}
	@RequestMapping("/ZhenShenhe")  
    public String Text3(String openingReportId){  
		shenheServiceImpl.updateShenhe(openingReportId); 
		
           return "redirect:/Shenhe";  
           }
	@RequestMapping("/ZhenShenhexxx")  
    public String Text5(String openingReportId){  
		shenheServiceImpl.updateShenheh(openingReportId);
           return "redirect:/Shenhe";  
           }
	
       
}
